<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container">
    <br>
    <h3>个人信息</h3>
    <br/>

    <br/>
    <table class="table table-bordered table-striped">
        <thead class="thead-dark">
             <tr th:each="aStudent:${student}">
                <td>学生姓名</td>
                <td th:text="${student.name}"></td>
            </tr>
            <tr th:text="${student}">
                 <td>学号</td>
                <td th:text="${student.studentId}"></td>
            </tr>
             <tr>
                 <td>邮箱</td>
             </tr>
             <tr>
                 <td>性别</td>
             </tr>
             <tr>
                 <td>手机号码</td>
             </tr>
             <tr>
                  <td>班级</td>
             </tr>
        </thead>
        <tbody>
        <tr th:each="aStudent : ${students}">
            <td th:text="${aStudent.name}"></td>
            <td th:text="${aStudent.wechatId}"></td>
            <td th:text="${aStudent.email}"></td>
            <td>
                <a th:href="@{/students/update(id=${aStudent.studentId})}" class="btn btn-info btn-sm">更新</a>
                <a th:href="@{/students/delete(id=${aStudent.studentId})}"
                   class="btn btn-danger btn-sm"
                   onclick="if (!(confirm('你确定要删除这个学生吗'))) return false">删除</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>